home *** CD-ROM | disk | FTP | other *** search
/ Toy Story Free! Interactive / Toy Story.iso / pc / DATA / math.swf / scripts / frame_33 / DoAction.as
Encoding:
Text File  |  2010-01-27  |  5.3 KB  |  324 lines

  1. var score = 0;
  2. stop();
  3. clock.gotoAndPlay(1);
  4. s1._visible = true;
  5. s2._visible = true;
  6. s3._visible = true;
  7. s4._visible = true;
  8. s5._visible = true;
  9. s6._visible = true;
  10. s7._visible = true;
  11. s8._visible = true;
  12. s9._visible = true;
  13. s10._visible = true;
  14. s11._visible = true;
  15. s12._visible = true;
  16. s13._visible = true;
  17. s14._visible = true;
  18. a1._visible = true;
  19. a2._visible = true;
  20. a3._visible = true;
  21. a4._visible = true;
  22. a5._visible = true;
  23. a6._visible = true;
  24. a7._visible = true;
  25. a8._visible = true;
  26. a9._visible = true;
  27. s1._x = 196;
  28. s1._y = 88;
  29. s1.onPress = function()
  30. {
  31.    this.startDrag();
  32.    s1._rotation = 0;
  33. };
  34. s1.onRelease = function()
  35. {
  36.    this.stopDrag();
  37.    s1._rotation = -15;
  38.    s1._x = 196;
  39.    s1._y = 88;
  40.    sfx.gotoAndPlay("no");
  41. };
  42. s2._x = 608;
  43. s2._y = 60;
  44. s2.onPress = function()
  45. {
  46.    this.startDrag();
  47.    s2._rotation = 0;
  48. };
  49. s2.onRelease = function()
  50. {
  51.    this.stopDrag();
  52.    s2._rotation = 15;
  53.    s2._x = 608;
  54.    s2._y = 60;
  55.    sfx.gotoAndPlay("no");
  56. };
  57. s3._x = 658;
  58. s3._y = 70;
  59. s3.onPress = function()
  60. {
  61.    this.startDrag();
  62. };
  63. s3.onRelease = function()
  64. {
  65.    this.stopDrag();
  66.    s3._x = 658;
  67.    s3._y = 70;
  68.    sfx.gotoAndPlay("no");
  69. };
  70. s4._x = 242;
  71. s4._y = 62;
  72. s4.onPress = function()
  73. {
  74.    this.startDrag();
  75.    s4._rotation = 0;
  76. };
  77. s4.onRelease = function()
  78. {
  79.    this.stopDrag();
  80.    if(this.hitTest(a3))
  81.    {
  82.       a3._visible = false;
  83.       s4._visible = false;
  84.       score += 10;
  85.       sfx.gotoAndPlay("yes");
  86.       nextFrame();
  87.    }
  88.    else
  89.    {
  90.       s4._rotation = 15;
  91.       s4._x = 242;
  92.       s4._y = 62;
  93.       sfx.gotoAndPlay("no");
  94.    }
  95. };
  96. s5._x = 297;
  97. s5._y = 62;
  98. s5.onPress = function()
  99. {
  100.    this.startDrag();
  101. };
  102. s5.onRelease = function()
  103. {
  104.    this.stopDrag();
  105.    if(this.hitTest(a7))
  106.    {
  107.       a7._visible = false;
  108.       s5._visible = false;
  109.       score += 10;
  110.       sfx.gotoAndPlay("yes");
  111.       nextFrame();
  112.    }
  113.    else
  114.    {
  115.       s5._x = 297;
  116.       s5._y = 62;
  117.       sfx.gotoAndPlay("no");
  118.    }
  119. };
  120. s6._x = 355;
  121. s6._y = 60;
  122. s6.onPress = function()
  123. {
  124.    this.startDrag();
  125.    s6._rotation = 0;
  126. };
  127. s6.onRelease = function()
  128. {
  129.    this.stopDrag();
  130.    if(this.hitTest(a1))
  131.    {
  132.       a1._visible = false;
  133.       s6._visible = false;
  134.       score += 10;
  135.       sfx.gotoAndPlay("yes");
  136.       nextFrame();
  137.    }
  138.    else
  139.    {
  140.       s6._rotation = -15;
  141.       s6._x = 355;
  142.       s6._y = 60;
  143.       sfx.gotoAndPlay("no");
  144.    }
  145. };
  146. s7._x = 411;
  147. s7._y = 65;
  148. s7.onPress = function()
  149. {
  150.    this.startDrag();
  151.    s7._rotation = 0;
  152. };
  153. s7.onRelease = function()
  154. {
  155.    this.stopDrag();
  156.    s7._rotation = 15;
  157.    s7._x = 411;
  158.    s7._y = 65;
  159.    sfx.gotoAndPlay("no");
  160. };
  161. s8._x = 556;
  162. s8._y = 63;
  163. s8.onPress = function()
  164. {
  165.    this.startDrag();
  166. };
  167. s8.onRelease = function()
  168. {
  169.    this.stopDrag();
  170.    if(this.hitTest(a6))
  171.    {
  172.       a6._visible = false;
  173.       s8._visible = false;
  174.       score += 10;
  175.       sfx.gotoAndPlay("yes");
  176.       nextFrame();
  177.    }
  178.    else
  179.    {
  180.       s8._x = 556;
  181.       s8._y = 63;
  182.       sfx.gotoAndPlay("no");
  183.    }
  184. };
  185. s9._x = 713;
  186. s9._y = 98;
  187. s9.onPress = function()
  188. {
  189.    this.startDrag();
  190. };
  191. s9.onRelease = function()
  192. {
  193.    this.stopDrag();
  194.    if(this.hitTest(a9))
  195.    {
  196.       a9._visible = false;
  197.       s9._visible = false;
  198.       score += 10;
  199.       sfx.gotoAndPlay("yes");
  200.       nextFrame();
  201.    }
  202.    else
  203.    {
  204.       s9._x = 713;
  205.       s9._y = 98;
  206.       sfx.gotoAndPlay("no");
  207.    }
  208. };
  209. s10._x = 192;
  210. s10._y = 209;
  211. s10.onPress = function()
  212. {
  213.    this.startDrag();
  214.    s10._rotation = 0;
  215. };
  216. s10.onRelease = function()
  217. {
  218.    this.stopDrag();
  219.    if(this.hitTest(a2))
  220.    {
  221.       a2._visible = false;
  222.       s10._visible = false;
  223.       score += 10;
  224.       sfx.gotoAndPlay("yes");
  225.       nextFrame();
  226.    }
  227.    else
  228.    {
  229.       s10._rotation = -15;
  230.       s10._x = 192;
  231.       s10._y = 209;
  232.       sfx.gotoAndPlay("no");
  233.    }
  234. };
  235. s11._x = 733;
  236. s11._y = 162;
  237. s11.onPress = function()
  238. {
  239.    this.startDrag();
  240.    s11._rotation = 0;
  241. };
  242. s11.onRelease = function()
  243. {
  244.    this.stopDrag();
  245.    if(this.hitTest(a8))
  246.    {
  247.       a8._visible = false;
  248.       s11._visible = false;
  249.       score += 10;
  250.       sfx.gotoAndPlay("yes");
  251.       nextFrame();
  252.    }
  253.    else
  254.    {
  255.       s11._rotation = -15;
  256.       s11._x = 733;
  257.       s11._y = 162;
  258.       sfx.gotoAndPlay("no");
  259.    }
  260. };
  261. s12._x = 181;
  262. s12._y = 150;
  263. s12.onPress = function()
  264. {
  265.    this.startDrag();
  266. };
  267. s12.onRelease = function()
  268. {
  269.    this.stopDrag();
  270.    if(this.hitTest(a4))
  271.    {
  272.       a4._visible = false;
  273.       s12._visible = false;
  274.       score += 10;
  275.       sfx.gotoAndPlay("yes");
  276.       nextFrame();
  277.    }
  278.    else
  279.    {
  280.       s12._x = 181;
  281.       s12._y = 150;
  282.       sfx.gotoAndPlay("no");
  283.    }
  284. };
  285. s13._x = 194;
  286. s13._y = 281;
  287. s13.onPress = function()
  288. {
  289.    this.startDrag();
  290.    s13._rotation = 0;
  291. };
  292. s13.onRelease = function()
  293. {
  294.    this.stopDrag();
  295.    s13._rotation = 15;
  296.    s13._x = 194;
  297.    s13._y = 281;
  298.    sfx.gotoAndPlay("no");
  299. };
  300. s14._x = 740;
  301. s14._y = 227;
  302. s14.onPress = function()
  303. {
  304.    this.startDrag();
  305. };
  306. s14.onRelease = function()
  307. {
  308.    this.stopDrag();
  309.    if(this.hitTest(a5))
  310.    {
  311.       a5._visible = false;
  312.       s14._visible = false;
  313.       score += 10;
  314.       sfx.gotoAndPlay("yes");
  315.       nextFrame();
  316.    }
  317.    else
  318.    {
  319.       s14._x = 740;
  320.       s14._y = 227;
  321.       sfx.gotoAndPlay("no");
  322.    }
  323. };
  324.